import { NextResponse } from "next/server"
import type { NextRequest } from 'next/server'
import { getServerUser } from "@/lib/session"
export async function GET( req: NextRequest) {
  try{
    const user = await getServerUser() as User
    return NextResponse.json({resource:user})
  }
  catch(error){
    return NextResponse.json( '获取用户信息失败！', { status: 500} )
  }
}